package com.kingsoft.dc.khaos.extender.meta.api;

import com.kingsoft.dc.khaos.extender.meta.model.ds.DmDatasource;

import java.io.Serializable;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
 * Created by jing on 19/6/26.
 */
@Setter
@Getter
@ToString
public class DmDatasourceResult implements Serializable {
    private static final long serialVersionUID = 1L;

    String dbName;
    String dbCnName;
    String dbCode;
    String dsName;
    int dsId;
    String dbType;
    String config;

    public DmDatasource toDatasource() {
        DmDatasource dmDatasource = new DmDatasource();
        dmDatasource.setDbCnName(dbCnName);
        dmDatasource.setDbName(dbName);
        dmDatasource.setDbCode(dbCode);
        dmDatasource.setDsName(dsName);
        dmDatasource.setDsId(dsId);
        dmDatasource.setDbType(dbType);
        return dmDatasource;
    }

}
